<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="/res/back/css/base.css" rel="stylesheet" type="text/css" />
<link href="/res/third/bootstrap3/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="/res/common/js/jquery.1.9.1.min.js" type="text/javascript"></script>
<script src="/res/third/bootstrap3/jsone/bootstrap.min.js" type="text/javascript"></script>
<script src="/res/third/artDialog/jquery.artDialog.js" type="text/javascript"></script>
<script src="/res/third/validate/jquery.validate.js" type="text/javascript"></script>
<script src="/res/third/layer/layer.js"></script>
<script type="text/javascript">
	function sosuo(){
		var lpath =location.pathname;
		//var pageNo = $("#pageNo").val();
		$("#soform").attr("action",lpath+"?pageNo="+1);
		$("#soform").submit();
	}

	$(document).ready(function(){
		
		 
	})
</script>
<style type="text/css">
	table{table-layout: fixed;}
	td{overflow: hidden;text-overflow:ellipsis;}
	.excelbtn{display: inline-block;height: 100%;width: 100px;background-color:#38A4C7;color: #fff;text-align: center;line-height: 35px;cursor: pointer;border-radius:5px;}
</style>
</head>

<body>
	<div class="panel panel-info panel-content">
	<div class="panel-heading" style="position: relative;">
			<form id="soform" method="post">
				<table>
					<tr>
						<td class="w80" style="padding-top: 5px">
							<label for="companyname" class="center-block">公司名称：</label>
						</td>
						<td class="w150 ">
							<input type="text" class="form-control" name="so_companyName" value="${so_companyName!}" id="so_search" placeholder="公司名称" data-options="">
						</td>
						<td style="padding-left: 10px">
							<div class="input-group">
								<span class="input-group-btn" style="border: 1px solid #ddd;">
									<button class="btn btn-default" type="button" onclick="sosuo()">搜索</button>
								</span>
							</div>
						</td>
						<td style="padding-left: 10px;font-size: 12px;font-family: inherit;color: inherit;">
							<span class="excelbtn"  onclick="coinRecord()">安装币流水</span>
						</td>
						<td style="padding-left: 10px;font-size: 12px;font-family: inherit;color: inherit;width: 690px;text-align: right;">
							<span>已使用安装币总量:<b style="color: red;">${nousercoin!}</b></span>
							<span>可用安装币总量:<b style="color: red;">${usercoin!}</b></span>
						</td>
					</tr>
				</table>
		</form>
		</div>
		<table class="table table-hover table-bordered table-striped table-condensed">
			<thead>
				<tr>
					<th width="8%">序号</th>
					<th width="20%">公司名称</th>
					<th width="12%">注册时间</th>
					<th width="12%">剩余安装币</th>
					<th width="12%">已使用</th>
					<th width="12%">已抵扣金额</th>
					<th width="12%">操作</th>
				</tr>
			</thead>
			[#list pagination.list as cm]
			<tr>
				<td align="center">${cm_index+1!}</td>
				<td align="center">${cm.companyName!}</td>
				<td align="center">${(cm.registertime?string("yyyy-MM-dd"))!}</td>
				<td align="center">${cm.uscoins!}</td>
				<td align="center">${cm.discoins!}</td>
				<td align="center">${cm.discoins!}元</td>
				<td> 
				 <button type="button" class="btn btn-info btn-xs delbtn" onclick="readWater('${cm.companyId!}')">查看流水</button>
				 <button type="button" class="btn btn-info btn-xs delbtn" onclick="koujian('${cm.companyId!}')">扣减</button>
				</td>
			</tr>
			[/#list]
		</table>

		<div class="panel-footer">[@fenye p = pagination form = 'infoForm' /]</div>
		 
	</div>
</body>
</html>
<script type="text/javascript">

function koujian(companyid){
	top.addTempTab("/coin/coinKouJian.do?id="+companyid);
}

function coinRecord(){
	top.addTempTab("/coin/coinRecord_list.do");
}
 
function readWater(companyId){
	top.addTempTab("/coin/CompanyCoinRecord_list.do?so_companyId="+companyId);
}
</script>